package com.xunai.saas.example.service.impl;

import com.xunai.saas.example.model.enums.IntelligentConsultationEnum;
import com.xunai.saas.example.model.param.AddPatientParam;
import com.xunai.saas.example.model.param.IntelligentConsultationNextParam;
import com.xunai.saas.example.model.param.IntelligentConsultationStart;
import com.xunai.saas.example.service.IntelligentConsultationService;
import com.xunai.saas.example.utils.HttpClientUtils;
import org.springframework.stereotype.Service;

@Service
public class IntelligentConsultationServiceImpl extends HttpClientUtils implements IntelligentConsultationService {

    @Override
    public String addPatient(AddPatientParam addPatientParam) {
        return sendPost(IntelligentConsultationEnum.addPatient.getUrl(),addPatientParam);
    }

    @Override
    public String getDepartmentList() {
        return sendGet(IntelligentConsultationEnum.getDepartmentList.getUrl());
    }

    @Override
    public String start(IntelligentConsultationStart intelligentConsultationStart) {
        return sendPost(IntelligentConsultationEnum.start.getUrl(), intelligentConsultationStart);
    }

    @Override
    public String getMainSymptomAll(Integer recordId) {
        String url = String.format(IntelligentConsultationEnum.getMainSymptomAll.getUrl(),recordId);
        return sendGet(url);
    }

    @Override
    public String next(IntelligentConsultationNextParam intelligentConsultationNextParam) {
        return sendPost(IntelligentConsultationEnum.next.getUrl(),intelligentConsultationNextParam);
    }

    @Override
    public String detail(Integer recordId) {
        String url = String.format(IntelligentConsultationEnum.detail.getUrl(),recordId);
        return sendGet(url);
    }


}
